x-extend:
  schema: config-values.yaml
type: object
properties:
  internal:
    type: object
    default: {}
    x-required-for-helm:
      - internalNetworkNames
    properties:
      connection:
        type: object
        x-examples:
          - { "authURL": "http://my.cloud.lalla/3/", "caCert": "mycacert", "domainName": "mydomain", "tenantName": "mytenantname", "username": "myuser", "password": "mypass", "region": "myreg" }
        x-required-for-helm:
          - authURL
          - username
          - password
          - domainName
          - region
        properties:
          authURL:
            type: string
          caCert:
            type: string
          domainName:
            type: string
          tenantName:
            type: string
          tenantID:
            type: string
          username:
            type: string
          password:
            type: string
          region:
            type: string
      internalNetworkNames:
        type: array
        default: []
        items:
          type: string
      externalNetworkNames:
        type: array
        default: []
        items:
          type: string
      zones:
        type: array
        default: []
        items:
          type: string
      instances:
        type: object
        default: {}
        properties:
          sshKeyPairName:
            type: string
          securityGroups:
            type: array
            items:
              type: string
          imageName:
            type: string
          mainNetwork:
            type: string
          additionalNetworks:
            type: array
            items:
              type: string
          additionalTags:
            type: array
            items:
              type: string
      podNetworkMode:
        type: string
        x-examples:
          - "VXLAN"
          - "DirectRouting"
          - "DirectRoutingWithPortSecurityEnabled"
      loadBalancer:
        type: object
        default: {}
        properties:
          subnetID:
            type: string
          floatingNetworkID:
            type: string
      tags:
        type: object
        additionalProperties:
          type: string
      storageClasses:
        type: array
        items:
          type: object
          properties:
            type:
              type: string
            name:
              type: string
      defaultStorageClass:
        type: string
      cniSecretData:
        type: string
      discoveryData:
        type: object
        description: |
          Contains information about data discovered from the cloud.
        required:
          - apiVersion
          - kind
          - mainNetwork
          - additionalNetworks
          - additionalSecurityGroups
          - defaultImageName
          - images
          - volumeTypes
          - flavors
          - zones
        properties:
          apiVersion:
            type: string
            enum:
              - deckhouse.io/v1alpha1
          kind:
            type: string
            enum:
              - OpenStackCloudProviderDiscoveryData
          mainNetwork:
            type: string
            description: |
              The path to the network that will serve as the primary network (the default gateway) for connecting to the virtual machine.
          additionalNetworks:
            type: array
            items:
              type: string
              minLength: 1
            description: |
              Paths to networks that VirtualMachines secondary NICs will connect to.
            uniqueItems: true
          additionalSecurityGroups:
            type: array
            description: |
              Security groups that will be applied to VM's network ports in addition to security groups set in a cloud provider configuration.

              They allow you to set firewall rules for provisioned instances.

              The `SecurityGroups` may not be supported by the cloud provider.
            items:
              type: string
              minLength: 1
            uniqueItems: true
          defaultImageName:
            type: string
            description: Virtual machine image name used by default.
          images:
            type: array
            items:
              type: string
              minLength: 1
            minItems: 1
            description: List of virtual machine images.
            uniqueItems: true
          volumeTypes:
            description: List of available volume types.
            type: array
            uniqueItems: true
            items:
              type: object
              required:
                - name
                - id
              properties:
                name:
                  type: string
                  description: Volume name.
                id:
                  type: string
                  description: Volume id.
                description:
                  type: string
                  description: Volume description.
                extraSpecs:
                  type: object
                  additionalProperties: true
                  description: Volume extra specs.
                isPublic:
                  type: boolean
                  description: Volume is public.
                qosSpecID:
                  type: string
                  description: Volume qos spec id.
          flavors:
            type: array
            items:
              type: string
              minLength: 1
            minItems: 1
            description: List of flavors.
            uniqueItems: true
          zones:
            type: array
            items:
              type: string
              minLength: 1
            minItems: 1
            description: Availability zones.
            uniqueItems: true
